<?php require_once "includes/basicas.php";
 ?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
        <title>Archivos: <%= controller.action_name %></title>
        <%= javascript_include_tag :defaults, 'prototype', 'menu' %>
        <%= active_scaffold_includes %>
        <%= stylesheet_link_tag 'scaffold' %>
        <%= stylesheet_link_tag 'sema' %>
    </head>
<!--header-->
    <body>

        <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td height="200" background="imgs/fnd.jpg">&nbsp;</td>
                        </tr>
                    </table></td>
                <td width="860"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td height="142" align="left" valign="top" bgcolor="#006666"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td width="23" height="123">&nbsp;</td>
                                                    <td width="212" align="left" valign="top"><a href="../home" target="_self"><img src="imgs/logo_sema_2.gif" alt="Inicio" width="212" height="123" border="0"/></a></td>
                                                    <td width="625" height="123" align="left" valign="bottom" >
                                                        <?php echo fnTituloHeader(); ?>
                                                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                            <tr>
                                                                <td width="600" height="15" align="right" valign="middle" class="ingresar"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                                        <tr>
                                                                            <td width="500"><div align="right" class="ingresar">Hola</div></td>
                                                                            <td width="100"><div align="right"><span class="nombre-usuario"><% if logged_in? %><%= current_user.login %> <% else %> <%= link_to 'Iniciar Sesion', login_path %>  <% end %></span></div></td>
                                                                        </tr>
                                                                    </table></td>
                                                                <td width="25" height="35">&nbsp;</td>
                                                            </tr>
                                                        </table>
                                                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                            <tr>
                                                                <td width="600" height="15" align="right" class="olvido-cerrar"> <% if logged_in? %><%= link_to 'Cerrar Sesion', logout_path %><% end %></td>
                                                                <td width="25">&nbsp;</td>
                                                            </tr>
                                                        </table>
                                                        
                                                    </td>
                                                </tr>
                                            </table>
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td height="19" background="imgs/fnd_header.gif">&nbsp;</td>
                                                </tr>
                                            </table></td>
                                    </tr>
                                </table>
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td height="19" align="left" background="imgs/fnd2.jpg">&nbsp;</td>
                                    </tr>
                                </table>
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td width="172" height="70" align="left" valign="top"><a href="../home" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('btn_inicio','','imgs/btn_inicio_over.gif',1)"><img src="imgs/btn_inicio.gif" name="btn_inicio" width="172" height="70" border="0"/></a></td>
                                        <td width="173" align="left" valign="top"><img src="imgs/btn_cargar_over.gif" width="173" height="70"/></td>
                                        <td width="172" align="left" valign="top"><a href="../informacion" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('btn_info','','imgs/btn_info_over.gif',1)"><img src="imgs/btn_info.gif" name="btn_info" width="172" height="70" border="0"/></a></td>
                                        <td width="173" align="left" valign="top"><a href="../usuarios" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('btn_usuario','','imgs/btn_usuario_over.gif',1)"><img src="imgs/btn_usuario.gif" name="btn_usuario" width="173" height="70" border="0"/></a></td>
                                        <td width="170" align="left" valign="top"><a href="../reporte" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('btn_reporte','','imgs/btn_reporte_over.gif',1)"><img src="imgs/btn_reporte.gif" name="btn_reporte" width="170" height="70" border="0"/></a></td>
                                    </tr>
                                </table>
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td height="269" align="left" valign="top" background="imgs/banner_carga.jpg">&nbsp;</td>
                                    </tr>
                                </table>
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td height="333" align="left" valign="top" background="imgs/caja_content_carga.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td width="35" height="333">&nbsp;</td>
                                                    <td width="790" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                            <tr>
                                                                <td height="80" align="left" valign="top" class="txt-titulo"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                                        <tr>
                                                                            <td height="40" align="left" valign="middle" class="txt-titulo">Cargar Informaci&oacute;n </td>
                                                                        </tr>

                                                                    </table></td>
                                                            </tr>
                                                            <tr>
                                                                <td height="233" align="left" valign="top">



                                                                    <h2>Archivos cargados</h2>

                                                                    <table>
                                                                        <tr>
                                                                            <th>Secretaria</th>
                                                                            <th>Año</th>
                                                                            <th>Archivo</th>
                                                                        </tr>

                                                                        <% @archivos.each do |archivo| %>
                                                                        <tr>
                                                                            <td><%=h archivo.secretaria.codigo_sed %></td>
                                                                            <td><%=h archivo.anio %></td>
                                                                            <td><%=h archivo.anexo_file_name %></td>
                                                                            <td><%= link_to 'Ver', archivo %></td>
                                                                            <td><%= link_to 'Editar', edit_archivo_path(archivo) %></td>
                                                                            <td><%= link_to 'Eliminar', archivo, :confirm => 'Está seguro?', :method => :delete %></td>
                                                                        </tr>
                                                                        <% end %>
                                                                    </table>

                                                                    <br />

                                                                    <%= link_to 'Subir nuevo archivo', new_archivo_path %>



                                                                </td>
                                                            </tr>

                                                        </table></td>

                                                </tr>
                                            </table></td>
                                    </tr>
                                </table>
<!--footer-->
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td height="27" background="imgs/line.gif">&nbsp;</td>
                                    </tr>
                                </table>
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td height="66" align="center" valign="top"><img src="imgs/creditos_footer.gif" width="224" height="66"/></td>
                                    </tr>
                                </table>
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td height="25" align="center" valign="middle" class="txt-footer">
                                            Pol&iacute;ticas de privacidad / Powered by Mg Group
                                        </td>
                                    </tr>
                                </table></td>
                        </tr>
                    </table></td>
                <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td height="200" background="imgs/fnd.jpg">&nbsp;</td>
                        </tr>
                    </table></td>
            </tr>
        </table>

    </body>
</html>
